<?php
/**
 * Created by PhpStorm.
 * User: chniccs
 * Date: 2019-01-19
 * Time: 9:59
 */

namespace app\model;


class AdminQueueMessage extends Base
{
    /**
     * 操作更新队列为已完成
     * @param $id
     * @return bool
     */
    public static function done($id){
        $model = parent::get($id);
        if(!$model){
            return false;
        }
        $model->setAttr('done',1);
        $done = $model->allowField(true)->save();
        return $done?true:false;
    }
}